package com.zbkj.common.model.card;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 礼品卡实体对象
 *
 * @author Swallows
 * @date 2022-08-15 10:53
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_store_card")
@ApiModel(value="礼品卡实体对象", description="礼品卡表")
public class StoreGiftCard implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "礼品卡表ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "礼品卡名称")
    private String name;

    @ApiModelProperty(value = "礼品卡背景图 主要用于电子卡展示")
    private String image;

    @ApiModelProperty(value = "兑换的礼品卡面值")
    private BigDecimal money;

    @ApiModelProperty(value = "礼品卡类型 1 电子卡 2 实体卡")
    private Integer cardType;

    @ApiModelProperty(value = "使用类型 1 储值卡, 2 指定商品卡, 3 指定品类卡")
    private Integer useType;

    @ApiModelProperty(value = "主键id 商品id/分类id", required = true)
    private String primaryKey;

    @ApiModelProperty(value = "是否固定使用时间, 默认0 否， 1是")
    private Boolean isFixedTime;

    @ApiModelProperty(value = "可使用时间范围 开始时间")
    private Date useStartTime;

    @ApiModelProperty(value = "可使用时间范围 结束时间")
    private Date useEndTime;

    @ApiModelProperty(value = "天数")
    private Integer day;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "状态（0：关闭，1：开启）")
    private Boolean status;

    @ApiModelProperty(value = "是否删除 状态（0：否，1：是）")
    private Boolean isDel;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "是否领取")
    @TableField(exist = false)
    private Boolean isGet = false;
}
